import http from '../libs/http'

const basicRoute = '/api/store'

export const index = (params) => {
  return http.get(basicRoute + '/index', {
    params
  })
}

export const add = (data) => {
    return http.post(basicRoute + '/add', data)
}

export const edit = (data) => {
    return http.post(basicRoute + '/edit', data)
}

export const setStorePass = (data) => {
    return http.post(basicRoute + '/setStorePass', data)
}

export const info = (params) => {
    return http.get(basicRoute + '/info', {
        params
    })
}

export const indexByAuth = () => {
    return http.get(basicRoute + '/index-by-auth')
}

export const login = (data) => {
    return http.post(basicRoute + '/login', data)
}


